package cn.edu.scau.cmi.liqiquan.safeComponent;

import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;

public class ControlPane extends BorderPane{
	public ControlPane() {
		Composite root = new Composite("root");
		Composite usr = new Composite("usr");
		Composite documents = new Composite("documents");
		Composite home = new Composite("home");
		Composite desktop = new Composite("desktop");
		
		Leaf test = new Leaf("test.txt");
		Leaf js = new Leaf("main.js");
		Leaf java = new Leaf("myJava.java");
		Leaf vue = new Leaf("aa.vue");
		
		root.addFolder(usr);
		root.addFolder(home);
		
		usr.addFolder(desktop);
		usr.addFolder(documents);
		
		desktop.addFile(js);
		documents.addFile(vue);
		documents.addFile(java);
		usr.addFile(test);
		
		TextArea ta = new TextArea();
		ta.appendText(root.scan());
		
		this.setCenter(ta);
	}
}
